do while PIL6<>1 .and. pil5<>2 .AND. LASTKEY()<>27
   SET COLOR TO BG+/B
   @ 15,1 CLEA TO 23,78
   do BOX2 WITH 15,3,"DO YOU WANT TO :",'PRINT','QUIT','GR+','RB','GR+','R',PIL5,.T.,.T.
   IF PIL5=1
      do BOX2 WITH 20,3,"IS THE PRINTER :",'READY','NOT YET READY','GR+','RB','GR+','R',PIL6,.T.,.T.
   ENDIF
ENDDO
IF LASTKEY()=27 .or. pil5=2
   RETURN
ENDIF
DO BOXT WITH 15,53,'Printing...','GR*+','R',.T.,.T.
SET DEVI TO PRIN
@  0,0 say chr(18) pict 'x'
@  6, 60  SAY chr(27)+'G'
@  6, 60  SAY DATE()
@  8, 13  SAY  PAT_NAME
@  8, 42  SAY  PAT_F_NAME
@  8, 77  SAY  PAT_M_INIT
@  10, 13  SAY   PAT_DOB
@  10, 42  SAY   PAT_NATIO
@  10, 72  SAY   PAT_SEX
@ 12, 15  SAY   BLOOD_GRP
@ 12, 30  SAY   BLOOD_RHE
@ 12, 71  SAY   PAT_FILCOD
@ 25, 13  SAY   HOM_ADD
@ 25, 61  SAY   HOM_CITY
@ 26, 13  SAY   HOM_COUNT
@ 26, 34  SAY   HOM_TEL
@ 26, 74  SAY   RESID_INDO PICT "Y"
@ 27, 43  SAY   LOC_ADD1
@ 28, 21  SAY   LOC_ADD2
@ 29, 10  SAY   LOC_CITY
@ 29, 34  SAY   LOC_TEL
@ 44, 15  SAY   JOB_POSIT
@ 45, 13  SAY   JOB_CORP
@ 46, 13  SAY   JOB_ADD1
@ 47, 21  SAY   JOB_ADD2
@ 48, 13  SAY   JOB_CITY
@ 48, 37  SAY   JOB_COUNT
@ 48, 61  SAY   JOB_FAX
@ 49, 15  SAY   JOB_TEL1
@ 49, 37  SAY   JOB_TEL2
@ 49, 63  SAY   JOB_TELEX
@ 50, 51  SAY   JOB_PERMGR
@ 51, 51  SAY   JOB_FINMGR
@ 60,0 SAY ' '
@ 60,0  SAY chr(27)+'H'
SELE 3
SET EXCLU OFF
USE &DR&F3
IF FIL_LOCK()
   APPEND BLANK
ENDIF
IF REC_LOCK()
   DO PATR20
ENDIF
UNLOCK
EJECT
SET DEVI TO SCREEN
SET COLO TO BG+/B,W+/N
@ 7,1 CLEA TO 23,78
PRPAT=.T.
RETURN
